/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.pub.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.pub.entity.PubUser;
import com.thinkgem.jeesite.modules.pub.dao.PubUserDao;

/**
 * 单表生成Service
 * @author zmy
 * @version 2019-04-18
 */
@Service
@Transactional(readOnly = true)
public class PubUserService extends CrudService<PubUserDao, PubUser> {
	
	@Autowired
	private PubUserDao pubUserDao;

	public PubUser get(String id) {
		return super.get(id);
	}
	
	public List<PubUser> findList(PubUser pubUser) {
		return super.findList(pubUser);
	}
	
	public Page<PubUser> findPage(Page<PubUser> page, PubUser pubUser) {
		return super.findPage(page, pubUser);
	}
	
	@Transactional(readOnly = false)
	public void save(PubUser pubUser) {
		super.save(pubUser);
	}
	
	@Transactional(readOnly = false)
	public void delete(PubUser pubUser) {
		super.delete(pubUser);
	}

	public String getPsd(String userno) {
		// TODO Auto-generated method stub
		return pubUserDao.getPsd(userno);
	}

	@Transactional(readOnly = false)
	public int register(String id, String username, String password, String userno, String tel, String age, String job, String birth) {
		// TODO Auto-generated method stub
		return pubUserDao.insertUser(id,username,password,userno,tel,age,job,birth);
	}

	public PubUser getInfo(String userno) {
		// TODO Auto-generated method stub
		return pubUserDao.getInfo(userno);
	}

	@Transactional(readOnly = false)
	public int updateUser(String id, String username, String password, String userno, String tel, String age,
			String job, String birth) {
		// TODO Auto-generated method stub
		return pubUserDao.updateUser(id,username,password,userno,tel,age,job,birth);
	}

	
}